home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: JamesCurran@CIS.CompuServe.com (James M. Curran)
- Newsgroups: comp.std.c
- Subject: Re: Nested MACROS ??
- Date: Tue, 02 Apr 1996 20:58:24 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4js4ev$ai1@dub-news-svc-2.compuserve.com>
- References: <4jgkno$mrr@aplinfo.jhuapl.edu> <4jhe6u$555@agate.berkeley.edu> <4jp3mi$bqc@aplinfo.jhuapl.edu>
- NNTP-Posting-Host: dd02-080.compuserve.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- In <<4jp3mi$bqc@aplinfo.jhuapl.edu>>,
- Stan Novinsky <stan_novinsky@jhuapl.edu> wrote:
-
- >Yes, I ses the problem. I took care of it
- >by changing to lower case x, however, I still
- >don't understand why the call to the MACROS on
- >an individual basis works...
- >EX :
- > X = 4;
- > cube_ans = CUBE(X);
-
- >This returns the correct value (64) when I run the program...
- >Thanks for all the responses ...
-
- No it doesn't -- it won't even compile. However, if you change the
- first line to "int x = 4;" (note lower-case this time) then it will.
- CUBE() as it was written in your original post will cube the value
- stored in the varaible named (lowercase) "x". The arguement to CUBE
- is ignored (since it doesn't appear in the macro definition)
-
-
-
-
- Truth,
- James
-
-